<%@page import="com.shop.pojo.Users"%>
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>detail.jsp</title>
    
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	
<script type="text/javascript" src="<%=basePath %>demo/js/jquery-1.9.1.min.js"></script>
<script type="text/javascript" src="<%=basePath %>demo/js/Validform_v5.3.2_min.js"></script>
<script type="text/javascript" src="<%=basePath %>demo/js/Validform_Datatype.js"></script>

	<link rel="stylesheet" href="demo/css/style.css" type="text/css" media="all" />
<link href="demo/css/demo.css" type="text/css" rel="stylesheet" />
<style>
.registerform li{padding-bottom:20px;padding-left: 50px;}
.Validform_checktip{margin-left:10px;}
.registerform .label{display:inline-block; width:100px;}
.action{padding-left:92px; style="text-align: center"}
</style>
  </head>
  
  <body>
    <div class="main"  >
    <div class="wraper"style="padding-left: 400">
       
        <h2 style="width: 500;text-align: center">请您仔细填写以下详细资料信息，以便所购买的的书能够及时投递。</h2>
        <%request.setCharacterEncoding("UTF-8"); %>
        
   <jsp:useBean id="tourist" class="com.shop.pojo.Users" scope="session"></jsp:useBean>

   <jsp:setProperty property="*" name="tourist"/>        
   
        <form class="registerform" action="customer/finished.jsp" method="post">
            <ul >
                <li>
                    <label class="label"><span class="need">*</span> 详细地址：</label>
                    <input type="text" value="" name="uaddress" class="inputxt" />
                </li>
                 <li>
                    <label class="label"><span class="need">*</span> 联系电话：</label>
                    <input type="text" value="" name="utelephone" class="inputxt" />
                </li>
               <li>
                    <label class="label"><span class="need">*</span> 身份证号：</label>
                    <input type="text" value="" name="uidcard" class="inputxt"  />
                </li>
                <li>
                	<label class="label"><span class="need">*</span> 性别：</label>
                    <input type="radio" value="1" checked="checked" name="usex" id="male" class="pr1" />
                    <label for="male">男</label> 
                    <input type="radio" value="2" name="usex" id="female" class="pr1" />
                    <label for="female">女</label>
                </li>
                
            </ul>
            <div class="action">
                <input type="submit" value="提 交" /> <input type="reset" value="重 置" />
            </div>
        </form>
    </div>
</div>

<script type="text/javascript">
$(function(){
	//$(".registerform").Validform();  //就这一行代码！;
		
	var demo=$(".registerform").Validform({
		tiptype:3,
		label:".label",
		showAllError:true,
		datatype:{
			"zh1-6":/^[\u4E00-\u9FA5\uf900-\ufa2d]{1,6}$/
		},
	});
	
	//通过$.Tipmsg扩展默认提示信息;
	//$.Tipmsg.w["zh1-6"]="请输入1到6个中文字符！";
	demo.tipmsg.w["zh1-6"]="请输入1到6个中文字符！";
	
	demo.addRule([{
		ele:".inputxt:eq(0)",
		datatype:"zh2-100"
	},
	{
		ele:".inputxt:eq(1)",
		datatype:"m"
	},
	{
		ele:".inputxt:eq(2)",
		datatype:"idcard"
	},
	{
		ele:"select",
		datatype:"*"
	},
	{
		ele:":radio:first",
		datatype:"*"
	}]);
	
});
</script>
  </body>
</html>
